/************************************************************
 *  * HONGHE CONFIDENTIAL
 * __________________
 * Copyright (C) 2014-2015 HONGHE Technologies. All rights reserved.
 *
 * NOTICE: All information contained herein is, and remains
 * the property of HONGHE Technologies.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from HONGHE Technologies.
 * The author is knight(卢远强), ios software engineer.
 */
<?php  

require_once("PHPUnit.php");

class DBTest extends PHPUnit_Framework_TestCase   
{   
	public $db;
	//开始的时候初始化一个待测试类   
	function setUp()   
	{   
		//新建数据库链接
		$id =mysql_connect("192.168.1.5","test004","123456")or die(mysql_error());
		// mysql_close($id); 
		$this->db =mysql_select_db("cdw",$id) or die(mysql_error());
	}   
	//最后消亡的时候清除掉这个类   
	function tearDown() {
		mysql_close(); 
	}   
	function testDB()   
	{
		/* it is checking the db.*/
		$this->assertEquals(true,$this->db);
	}
}   
	